package org.example.stockdemo;

/**
 * @author :Mr.zhou
 * @description: TODO edit class Description
 * @create date: 2025/11/8 14:31
 */
public enum StockSortTypeEnum {
    INDUSTRY_DOWN_RANK("priceRatio","down","涨幅榜"),
    INDUSTRY_UP_RANK("priceRatio","up","跌幅榜"),
    MONEY_RANK("netMainIn","down","资金净流入"),
    SPEED_RANK("speed","down","涨速");

    private StockSortTypeEnum(String sortType, String direct, String sortName){
        this.sortType = sortType;
        this.direct = direct;
        this.sortName = sortName;
    }

    // 根据sortType,direct 获取sortName
    public static String getSortName(String sortType,String direct){
        for (StockSortTypeEnum value : values()) {
            if (value.sortType.equals(sortType) && value.direct.equals(direct)) {
                return value.sortName;
            }
        }
        return null;
    }

    private String sortType;
    private String direct;
    private String sortName;
}
